package basics;

import org.junit.Test;

import java.io.UnsupportedEncodingException;

/**
 * @author: zhenzhong.wang@honeywell.com
 * @date: 2019/9/5 1:55 PM
 */
public class StringTest {

  @Test
  public void test1() throws UnsupportedEncodingException {
    String source = "USER PIN=3 Name=���漶 Pri=0 Passwd= Card= Grp=1 TZ=0001000100000000 Verify=-1";
    byte[] bytes = new String(source.getBytes("utf-8"), "gbk").getBytes("gbk");

    System.out.println(bytes.length);
  }
}
